/**
 *
 */
package co.fitstart.weapp.api.service;

import java.util.List;
import java.util.Map;

import com.demo2do.core.entity.page.Page;

import co.fitstart.entity.content.Activity;
import co.fitstart.entity.content.Article;
import co.fitstart.entity.content.Module;
import co.fitstart.entity.content.News;
import co.fitstart.entity.content.page.Webpage;

/**
 * @author downpour
 *
 */
public interface ContentService {

    /**
     * @param alias
     * @return
     */
    public Webpage getWebPage(String alias);
    
    /**
     * @param moduleId
     * @return
     */
    public Module getModule(Long moduleId);

    /**
     * @return
     */
    public List<Module> listModules();

    /**
     * @param page
     * @return
     */
    public List<News> listNews(Page page);
    
    /**
     * 
     * @param keyword
     * @return
     */
    public int countActivity(String keyword);
    
    /**
     * 
     * @param perPage
     * @return
     */
    public List<Activity> listActivity(int perPage);

    /**
     * @param keyword
     * @param page
     * @return
     */
    public List<Activity> listActivity(String keyword, Page page);
    
    /**
     * 
     * @param moduleId
     * @param keyword
     * @return
     */
    public int countArticle(Long moduleId, String keyword);
    
    /**
     * 
     * @param perPage
     * @return
     */
    public List<Article> listArticle(int perPage);

    /**
     * @param moduleId
     * @param keyword
     * @param page
     * @return
     */
    public List<Article> listArticle(Long moduleId, String keyword, Page page);

    /**
     * @param webpage
     * @return
     */
    public Map<String, List<Article>> listArticle(Webpage webpage);

}
